package com.epalmpay.service.shop;

import java.util.List;
import java.util.Map;

import com.epalmpay.bean.ShopDetailBean;
import com.epalmpay.dto.agent.AgentNetInDTO;
import com.epalmpay.dto.mall.MallGoodListOutDTO;
import com.epalmpay.dto.member.MemberOutDTO;
import com.epalmpay.dto.merchantmanage.GroupOutDTO;
import com.epalmpay.dto.shopuser.ShopCashierInDTO;
import com.epalmpay.dto.shopuser.ShopCashierListOutDTO;
import com.epalmpay.entity.Page;
import com.epalmpay.entity.Response;
import com.epalmpay.exception.ApplicationException;
import com.epalmpay.dto.agent.AgentInDTO;
import com.epalmpay.dto.agent.AgentInfoOutDTO;
import com.epalmpay.dto.agent.AgentListOutDTO;
import com.epalmpay.dto.member.BalanceInDTO;
import com.epalmpay.dto.merchantmanage.GroupListOutDTO;
import com.epalmpay.entity.Shop;
import com.epalmpay.dto.system.*;

public interface IShopService {

	
	
	/**门店列表
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public ShopListOutDTO listShop (ShopInDTO shopInDTO, PageDTO pageDTO)throws Exception;
	
	/**
	 * 二维码列表
	 * @param shopInDTO
	 * @return
	 * @throws Exception
	 */
	public ShopListOutDTO listShopCrcode (CrcodeInDTO shopCrcodeInDTO)throws ApplicationException;
	

    ShopSelectiveListOutDTO shopSelective(ShopSelectiveQueryDTO shopSelectiveQueryDTO) ;
    /**
     * 商户费率
     * @param groupId
     * @return
     */
    public ShopListOutDTO rate (Long groupId,Byte type) throws ApplicationException;
    /**
     * 代理商查询
     * @param groupId
     * @return
     */
    public AgentInfoOutDTO selectAgentName (ShopInDTO shopInDTO) throws ApplicationException;
    /**
     * 保存门店
     * @param groupId
     * @return
     */
    public Boolean  saveshop(ShopInDTO shopInDTO) throws ApplicationException;
    /**
     * 修改门店
     * @param groupId
     * @return
     */
    public Boolean  editShop(ShopInDTO shopInDTO) throws ApplicationException;
    public Boolean  editShopAccount(ShopInDTO shopInDTO) throws ApplicationException;
    /**
     * 修改门店状态
     * @param groupId
     * @return
     */
    public BaseOutDTO  updateShopState(ShopInDTO shopInDTO) throws ApplicationException;
    /**
     * 保存二维码
     * @param shopInDTO
     * @return
     * @throws Exception
     */
    public Boolean  saveShopCrcode(CrcodeInDTO shopInDTO) throws ApplicationException;
    
    
    /**
     * 修改二维码
     * @param shopInDTO
     * @return
     * @throws Exception
     */
    public Boolean  updateShopCrcode(CrcodeInDTO shopInDTO) throws ApplicationException;
    
    /**
     * 查询门店详情
     * @param shopInDTO
     * @return
     * @throws Exception
     */
    public ShopOutDTO  selectShopInfo(ShopInDTO shopInDTO) throws ApplicationException;
    
    /**
     * 根据大商户id查询门店列表
     * @param groupId
     * @return
     * @throws Exception
     */
    public AgentListOutDTO agentList(AgentInDTO agentInDTO) throws ApplicationException;
    public AgentListOutDTO agentList2(AgentInDTO agentInDTO) throws ApplicationException;

    public GroupListOutDTO GroupList() throws ApplicationException;
    
    /**
     * 查询二维码详情
     * @param shopInDTO
     * @return
     * @throws Exception
     */
    public CrcodeOutDTO  selectCrcode(Long id) throws ApplicationException;

	List<Map<String, String>> getNonemptyAgent(Long groupId);

	List<Map<String, String>> getNonemptyIndustry(Long groupId);

    List<Map> getShopListById(ShopDetailBean shopDetailBean);
    List<Map> getShopListById2(List shopIdList, Long activityId);
    /**
     * 渠道修改会员所属门店
     * @param shop
     */
	public void updateShop(Shop shop) throws ApplicationException;


    ShopListOutDTO listGroupShop(Long groupId)throws ApplicationException;

    ShopListOutDTO memberRate(Long groupId, Byte type)throws ApplicationException;

	public CheckOutDTO checkYsShop(ShopInDTO shopInDTO);

	
	public Boolean addBalance(BalanceInDTO balanceInDTO)throws ApplicationException;

    ShopCashierListOutDTO listShopCashier(ShopCashierInDTO shopCashierInDTO, Page page);

    BaseOutDTO addShopCashier(ShopCashierInDTO shopCashierInDTO);

    Boolean saveAgentNetIn(AgentNetInDTO agentNetInDTO)throws ApplicationException;

    BaseOutDTO changeStatus(ShopCashierInDTO shopCashierInDTO);

    Map getShopDetailById(Long shopid);

    /**
     * 根据用户编号查询门店信息
     * @param userid
     * @return
     */
    Shop getShopIdByUserId(Long userid);

    ShopListOutDTO shopSelect(ShopSelectQueryDTO shopSelectQueryDTO);

    ShopListOutDTO listAgentShop(Long groupId, Long agentId)throws ApplicationException;
    /**
     * 根据GroupId获取到该渠道下的所有门店信息
     * @param shopSelectQueryDTO
     * @return
     */
    ShopListOutDTO selectShopList(ShopSelectQueryDTO shopSelectQueryDTO) throws Exception;

    MemberOutDTO queryShopAmount(ShopInDTO shopInDTO)throws ApplicationException;

    MemberOutDTO addShopBalance(BalanceInDTO balanceInDTO, String root_home_url)throws ApplicationException;

    /**
     * 根据门店ID，查找对应的门店的名称
     * @param shopId
     * @return
     * @throws Exception
     */
    GroupOutDTO getShopNameById(Long shopId) throws Exception;

    /**
     * 根据渠道ID，门店名称，查询门店信息
     * @param groupId
     * @param shopName
     * @return
     * @throws ApplicationException
     */
    Response getShopByName(Long groupId, String shopName) throws ApplicationException;

    /**
     * 根据代理商ID，查询该代理商的直属门店信息
     * @param shopSelectQueryDTO
     * @return
     * @throws Exception
     */
    List<Long> getAgentShopList(ShopSelectQueryDTO shopSelectQueryDTO) throws Exception;
}
